package com.dscs.browser;

import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;
import com.intellij.openapi.util.IconLoader;
import com.intellij.uiDesigner.core.GridConstraints;

import javax.swing.*;
import java.awt.*;

public class Browser {

    public static Icon logo = IconLoader.getIcon("/icons/load.png");
    private static JWebBrowser webBrowser;

    private JTextField ajksdhgfkashjgdfkasjdfhTextField;
    private JPanel panel;
    private JPanel browser_panel;
    private JButton 进入Button;

    public static void main(String[] args) {
        JFrame frame = new JFrame("Browser");
        Browser browser = new Browser();
        frame.setContentPane(browser.panel);
        webBrowser = new JWebBrowser();
        webBrowser.navigate("https://www.baidu.com");
        webBrowser.setButtonBarVisible(true);
        webBrowser.setMenuBarVisible(true);
        webBrowser.setBarsVisible(true);
        webBrowser.setStatusBarVisible(true);
        browser.browser_panel.setLayout(new BorderLayout());
        browser.browser_panel.add(webBrowser,BorderLayout.CENTER);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
}
